home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 16
/
016.d81
/
pps #38
< prev
next >
Wrap
Text File
|
2022-08-26
|
2KB
|
134 lines
======================================
PEEKs, POKEs, & SYSes -- Part 38
by James Gregory Wheeler and
Alien the Garden
======================================
Last month we gave you routines to
draw hi-resolution vertical and
horizontal lines. By now you've
probably guessed that we did that
because we couldn't figure out how to
do diagonal lines.
This month we figured out how to do
diagonals so we thought we'd share
that new gem with you.
The machine code routines this time
are called SYSPLOTTERC. Here's how
they differ from last month's
SYSPLOTTERB routines.
1. HRIZLINE and VERTLINE have been
deimplemented (that's high-tech
for "taken out").
2. LINE and XLINE have been put in
their place.
LINE and XLINE use four parameters
each, a horizontal and a vertical
coordinate for each end of the line,
like so:
SYS LINE,H1,V1,H2,V2
H1,V1
/
/
/
/
/
H2,V2
LINE draws a solid line from the
first pair of horizontal coordinates
to the second pair.
XLINE erases a solid line from the
first pair to the second.
--------------------------------------
Here, then, are the SYSes and
maximum parameter values for the
SYSPLOTTERC routines. You will
recognize most of them from the
previous installments of PEEKs,
POKEs, and SYSes.
SETGRAPHIC: turn on hi-res
SYS 49152
UNGRAPHIC: return to text screen
SYS 49155
CLEARGRAPHIC: erase hi-res screen
SYS 49158
COLORSMEAR: set hi-res background
SYS 49161, <15>
PLOTCOLOR: set hi-res "pen" color
SYS 49164, <15>
DRAW: turn on a single hi-res point
SYS 49167, <319>, <199>
ERASE: turn off a hi-res point
SYS 49170, <319>, <199>
LINE: draw a hi-res line
SYS 49173,<319>,<199>,<319>,<199>
XLINE: erase a hi-res line
SYS 49176,<319>,<199>,<319>,<199>
-------------------------
Special thanks to Ed Loewenstein
for coming up with the line algorithm.
======================================
Our demo program this month is
called PLOTTERC DEMO. It has two fun
and one serious application for
diagonal lines. If you want to look
at it, say so now by pressing the '\'
\oad"plotterc demo",8
(English pound) key now.
-----------<end of article>----------